<%= content_for :title, t("scaffold.edit.title", model: "Project") %>
<%= project_layout(@project) do %>
  <div class="space-y-10">
    <div>
      <h2 class="text-2xl font-bold">General</h2>
      <hr class="mt-3 mb-4 border-t border-base-300" />
      <%= render "edit_form", project: @project %>
    </div>

    <% if @project.show_fork_options? %>
      <h2 class="text-2xl font-bold">Pull Request Apps</h2>
      <hr class="mt-3 mb-4 border-t border-base-300" />
      <div>
        <%= render "projects/project_forks/form", project: @project %>
      </div>
    <% end %>

    <div>
      <h2 class="text-2xl font-bold">Volumes</h2>
      <hr class="mt-3 mb-4 border-t border-base-300" />

      <%= render "projects/volumes/index", project: @project %>
    </div>

    <div>
      <h2 class="text-2xl font-bold">Buildpacks</h2>
      <hr class="mt-3 mb-4 border-t border-base-300" />

      <%= render "build_packs/search" %>
    </div>

    <div>
      <h2 class="text-2xl font-bold">Danger zone</h2>
      <hr class="mt-3 mb-4 border-t border-base-300" />
      <div class="mt-6">
        <%= button_to @project, method: :delete, class: "btn btn-error btn-outline group mt-2", form: { data: { turbo_confirm: t("are_you_sure") } } do %>
          <iconify-icon icon="lucide:trash" height="20" class="text-error group-hover:text-error-content"></iconify-icon>
          Delete Project
        <% end %>
      </div>
    </div>
  </div>
<% end %>
